<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=<?= getMessageByKey('default.charset')?>"/>
  <title><?= getMessageByKey('alert.title')?></title>
  <link rel="stylesheet" type="text/css" href="css/alert.css">
  <script src="resources/jquery.js"></script>
</head>
<body>
<?php
/**
 * Created by PhpStorm.
 * User: alexey
 * Date: 5/20/14
 * Time: 6:03 PM
 */

$header = "";
$body = "";
$viewPage = "";

if (!empty($_GET['header']) && !empty($_GET['body'])) {
  $header = getMessageByKey($_GET['header']);
  $body = getMessageByKey($_GET['body']);
} else {
  $header = getMessageByKey("default.header");
  $body = getMessageByKey("default.body");
}

if (!empty($_GET['view'])) {
  $viewPage = \controller\ControllerUtil::decodeUrl($_GET['view']);
} else {
  $viewPage = 'default.view';
}


?>

<div class="alert">
  <div class="alertheader">
    <?= $header ?>
  </div>
  <div class="alertcontent">
    <?= $body ?>
  </div>

  <div class="alertredirect" onclick="location.href = '?action=<?= $viewPage ?>'">
    <?= getMessageByKey('button.general.goto')?>
  </div>
  <script>
    setTimeout("location.href='?action=<?= $viewPage?>'", 5000)
  </script>
</div>

</body>
</html>